{template 'header'}
<style type="text/css">
.third-pay-page {
    background-color:#fff;
}
.third-pay-page .content-block {
    width:100%;
    min-height:0;
    background-color:#21CA65;
    padding:40px 0;
    text-align:center;
}
.third-pay-page .radar {
    width:112px;
    height:112px;
    position:relative;
    background-size:112px 112px;
    background-image:url('{RES}img/Group2.png');
    margin:0 auto;
    margin-bottom:18px;
}
.third-pay-page .radar .pointer {
    position:absolute;
    z-index:1024;
    left:4%;
    right:4%;
    top:4%;
    bottom:50%;
    will-change:transform;
    -webkit-transform-origin:50% 100%;
    -ms-transform-origin:50% 100%;
    transform-origin:50% 100%;
    border-radius:50% 50% 0 0 / 100% 100% 0 0;
    background-image:linear-gradient(-135deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 100%);
    -webkit-clip-path:polygon(100% 0, 100% 10%, 50% 100%, 0 100%, 0 0);
    clip-path:polygon(100% 0, 100% 10%, 50% 100%, 0 100%, 0 0);
    -webkit-animation:rotate360 1s linear both;
    animation:rotate360 1s linear both;
}
.third-pay-page .loaded-icon {
    width:27px;
    height:19px;
    position:absolute;
    top:50%;
    left:0;
    right:0;
    margin:0 auto;
    margin-top:-9.5px;
    -webkit-animation:loadedShow 0.3s 1s both;
    animation:loadedShow 0.3s 1s both;
}
@-webkit-keyframes rotate360 {
    0% {
        -webkit-transform:rotate(0deg);
        -ms-transform:rotate(0deg);
        transform:rotate(0deg);
        opacity:1;
    }
    90% {
        opacity:1;
    }
    100% {
        -webkit-transform:rotate(480deg);
        -ms-transform:rotate(480deg);
        transform:rotate(480deg);
        opacity:0;
    }
}
@keyframes rotate360 {
    0% {
        -webkit-transform:rotate(0deg);
        -ms-transform:rotate(0deg);
        transform:rotate(0deg);
        opacity:1;
    }
    90% {
        opacity:1;
    }
    100% {
        -webkit-transform:rotate(480deg);
        -ms-transform:rotate(480deg);
        transform:rotate(480deg);
        opacity:0;
    }
}
@-webkit-keyframes loadedShow {
    0% {
        opacity:0;
        -webkit-transform:scale(0.3);
        -ms-transform:scale(0.3);
        transform:scale(0.3);
    }
    100% {
        opacity:1;
        -webkit-transform:scale(1);
        -ms-transform:scale(1);
        transform:scale(1);
    }
}
@keyframes loadedShow {
    0% {
        opacity:0;
        -webkit-transform:scale(0.3);
        -ms-transform:scale(0.3);
        transform:scale(0.3);
    }
    100% {
        opacity:1;
        -webkit-transform:scale(1);
        -ms-transform:scale(1);
        transform:scale(1);
    }
}
.third-pay-page .word {
    position:relative;
}
.third-pay-page .word .loading-word {
    position:absolute;
    top:0;
    left:0;
    width:100%;
    text-align:center;
    font-size:20px;
    font-weight:500;
    color:rgba(255, 255, 255, 1);
    line-height:28px;
    -webkit-letter-spacing:1px;
    -moz-letter-spacing:1px;
    -ms-letter-spacing:1px;
    letter-spacing:1px;
    -webkit-animation:wordHide 0.2s 1s both;
    animation:wordHide 0.2s 1s both;
}
.third-pay-page .word .loaded-word {
    text-align:center;
    font-size:16px;
    color:rgba(255, 255, 255, 1);
    line-height:22px;
    -webkit-animation:wordShow 0.2s 1.2s both;
    animation:wordShow 0.2s 1.2s both;
}
.third-pay-page .word .loaded-word .title {
    font-size:20px;
    font-weight:600;
    line-height:28px;
    -webkit-letter-spacing:1px;
    -moz-letter-spacing:1px;
    -ms-letter-spacing:1px;
    letter-spacing:1px;
    margin-bottom:4px;
}
@-webkit-keyframes wordShow {
    0% {
        opacity:0;
    }
    100% {
        opacity:1;
    }
}
@keyframes wordShow {
    0% {
        opacity:0;
    }
    100% {
        opacity:1;
    }
}
@-webkit-keyframes wordHide {
    0% {
        opacity:1;
    }
    100% {
        opacity:0;
    }
}
@keyframes wordHide {
    0% {
        opacity:1;
    }
    100% {
        opacity:0;
    }
}
</style>
	<div class="third-pay-page g-text-center">
	    <div class="content-block">
	        <div class="radar">
	            <div class="pointer"></div>
	            <img src="{RES}img/gou.png" alt="" class="loaded-icon">
	        </div>
	        <div class="word">
	            <p class="loading-word">正在安全扫描中…</p>
	            <div class="loaded-word">
	                <p class="title">安全</p>
	                <p>该网页安全，请放心支付</p>
	            </div>
	        </div>
	    </div>
	</div>
</div>
</div>
{template 'loading'}
<script type="text/javascript">
{if $order['paytype']==2}
setTimeout(function(){
	location.href = "{php echo $this->murl('sub',array('id'=>$id))}";
},1500);
{else if $order['paytype']==1}
document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
	WeixinJSBridge.invoke('getBrandWCPayRequest', {php echo json_encode($result)}, function(res) {
		if(res.err_msg == 'get_brand_wcpay_request:ok') {
			location.href = "{php echo $this->murl('sub',array('id'=>$id))}";
		} else if(res.err_msg == 'get_brand_wcpay_request:cancel') {
			location.href = "{php echo $this->murl('payfail',array('id'=>$id))}";
		}else{
			alert('启动微信支付失败, 请检查你的支付参数. 详细错误为: ' + res.err_msg);
		}
	});
}, false);
{/if}
</script>
</body>


</html>